package com.coincalf.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 资金划转纪录表
 */
@Data
@TableName("hz_record")
public class HzRecord extends Model<HzRecord> {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String tradeNo;

    /**
     * 国际电话区号
     */
    @TableField("country_code")
    private String countryCode;

    private String mobile;

    private String name;

    private BigDecimal num;

    private String from;

    private String to;

    /**
     * 划转方向 1 EX->MINE  2 MINE->EX
     */
    private Integer hzDirection;

    private Date created;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
